/**
 * 
 */
package code.google.com.p.speersport;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;

/**
 * @author Gilbert
 * 
 */
public class Start {
	
	private static final int LINE_ELEMENT_COUNT = 20;
	
	private static final int CHUNK = 500;

	/**
	 * simple file reader
	 */
	public static double[][] readFile(File inp) {
		BufferedReader inpReader = null;
		double[][] result = new double[CHUNK][LINE_ELEMENT_COUNT];

		try {
			FileReader inpFileReader = new FileReader(inp);
			inpReader = new BufferedReader(inpFileReader);

			String l;
			while ((l = inpReader.readLine()) != null) {
				// TODO: do stuff
			}

		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			// TODO: FIXXXXX MEEEEE
			try {
				inpReader.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}

		return result;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		File f = new File("C:\file.txt");
		double[][] output = Start.readFile(f);
	}

}
